#include<iostream>
#include<string>
using namespace std;
const int N = 10;
string s;
int n = 0;
void dfs(int x)
{
	if (x > n)//注意别写成x>3
	{
		cout << s << endl;
		return;
	}
	s += 'N';
	dfs(x + 1);
	s.pop_back();

	s += 'Y';
	dfs(x + 1);
	s.pop_back();
}
int main()
{

	cin >> n;
	//深度优先搜索
	dfs(1);
	return 0;
}
